package org.gwu.seuss.communication.request;

import java.io.Serializable;

public enum Permissions implements Serializable {
	UPLOAD(1), DOWNLOAD(2), DELETE(3), REMOVE_ALL(4);

	private final int value;

	Permissions(int value) {
		this.value = value;
	}

	public int getValue() {
		return value;
	}

	public static Permissions getValue(String permissionString) {
		if (permissionString.equals("upload")) {
			return UPLOAD;
		} else if (permissionString.equals("download")) {
			return DOWNLOAD;
		} else if (permissionString.equals("delete")) {
			return DELETE;
		} else if (permissionString.equals("remove")) {
			return REMOVE_ALL;
		}
		return null;
	}

}
